home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / conf / HPPA.m4 < prev    next >
Text File  |  1997-07-22  |  1KB  |  32 lines

  1. divert(-1)
  2. undefine(`len')
  3. #
  4. # the HP Snake does nothing special to FORTRAN function names
  5. #
  6. #   The preceding statement is not QUITE true....  If one invokes
  7. #   certain options for the HP compiler, THEN subprogram names take
  8. #   on the form.... "abcedf_"  as opposed to "abcdef" as stated above.
  9. #   There seems to be no clean solution.  MY answer is to create TWO
  10. #   separate libaries, one WITH underscores in the names and one WITHOUT.
  11. #   Each routinme is compiled twice, once with an underscore in the
  12. #   routine name and once without.  Thus, each ".o" file actually
  13. #   contains two routines.   The resulting library lets the loader
  14. #   pick and choose whichever the perverted HP system wants at THAT
  15. #   particular time.....                        -RWB 1/5/93
  16. define(`FUNCTION',ifdef(`USCORYES',`$1_',`$1'))
  17.  
  18. #define(`FUNCTION',`$1')
  19. #
  20. # FORTRAN character strings are passed as follows:
  21. # a pointer to the base of the string is passed in the normal
  22. # argument list, and the length is passed by value as an extra
  23. # argument, after all of the other arguments.
  24. #
  25. define(`ARGS',`($1`'undivert(1))')
  26. define(`SAVE',`divert(1)$1`'divert(0)')
  27. define(`STRING_ARG',`$1_ptr`'SAVE(`, $1_len')')
  28. define(`STRING_ARG_DECL',`char * $1_ptr; int $1_len')
  29. define(`STRING_LEN',`$1_len')
  30. define(`STRING_PTR',`$1_ptr')
  31. divert(0)
  32.